package io.gitee.zhangbinhub.admin.oauth.controller.inner

import cn.dev33.satoken.oauth2.processor.SaOAuth2ServerProcessor
import io.gitee.zhangbinhub.acp.boot.log.LogAdapter
import io.gitee.zhangbinhub.admin.common.api.CommonPath
import io.gitee.zhangbinhub.admin.resource.server.base.BaseResourceServerController
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import org.noear.solon.annotation.Controller
import org.noear.solon.annotation.Inject
import org.noear.solon.annotation.Mapping
import org.noear.solon.validation.annotation.Valid

@Valid
@Controller
@Api("权限信息（内部接口）")
open class InnerTokenController(@Inject logAdapter: LogAdapter) : BaseResourceServerController(logAdapter) {
    @ApiOperation("token相关请求", notes = "处理所有 OAuth2 相关请求")
    @Mapping("${CommonPath.innerBasePath}/oauth/*")
    fun oauth(): Any = SaOAuth2ServerProcessor.instance.dister()
}
